package edu.wayne.cs.csc4110.hw6.framework.user;

import edu.wayne.cs.csc4110.hw6.interfaces.user.User;

/**
 * This is the Base Class for Plugin Users. Developers should extend this class for their own user implementations.
 * @author Andrew
 *
 */
public class BaseUser implements User {

	private String username;

	public BaseUser(String username) {
		this.username = username;
	}

	@Override
	public String getUsername() {
		return username;
	}

	@Override
	public boolean equals(Object other) {
		if (!(other instanceof User))
			return false;
		return this.username.equals(((User) other).getUsername());
	}

	@Override
	public int hashCode() {
		return this.username.hashCode();
	}
}
